package com.jiuyin.dianjing.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;

import androidx.localbroadcastmanager.content.LocalBroadcastManager;

import com.jiuyin.dianjing.util.LogUtil;

import static com.jiuyin.dianjing.constant.AppConstant.ACTION_ORDER_UPLOAD;

/**
 * Description: 用来接收订单消息
 * 发送消息给本应用去处理 CusReceiver
 * File: OrderReceiver.java
 * Author: Administrator
 * Create: 2019/11/6 14:16
 */
public final class OrderReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        LogUtil.logCommon("OrderReceiver onReceive action = " + action);
        if (!TextUtils.isEmpty(action) && ACTION_ORDER_UPLOAD.equals(action)) {
            LocalBroadcastManager.getInstance(context).sendBroadcast(intent);
        }
    }
}
